<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>轻松记</title>
		<link href="<?php echo base_url()?>css/bootstrap.css" rel="stylesheet" />
		<!--<link href="css/bootstrap-responsive.min.css" rel="stylesheet" />-->
		<link href="<?php echo base_url()?>css/style.css" rel="stylesheet" />
		<script src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
		<script src="http://lib.sinaapp.com/js/jquery-ui/1.8.2/jquery-ui.min.js" type="text/javascript"></script>
		<script src="http://lib.sinaapp.com/js/bootstrap/2.0.3/js/bootstrap.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url()?>js/fun.js" type="text/javascript"></script>
	</head>
	<body style="background: #fff;">
		<div class="container">
			<div class="navbar login-navbar">
				<div class="navbar-inner navbar-fixed-top">
					<div class="container">
						<a class="brand" href="#"></a>
						<ul class="nav pull-right">
							<li class="divider-vertical"></li>
							<li class="dropdown">
								<a href="#">使用帮助</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
		<div class="container login-container">
		
			<?php $is_login_error = $this->input->get_post('error') == 'user';?>
			<?php if($is_login_error) {?>
			<div class="alert alert-error">
  				<a class="close" data-dismiss="alert">×</a>
  				邮件地址或密码错误，请重新输入。
			</div>
			<?php }?>
			
			<div class="login-form">
				<div class="login-welcome"></div>
				<?php 
				$attributes = array('id' => 'loginform');
				echo form_open('user/login', $attributes);
				?>
				<div class="login-signin">
					<div class="placeholding-input username">
						<input type="text" class="text-input email-input" autocomplete="off" id="login-mail" name="mail" title="用户名或电子邮件地址" autocomplete="on">
						<span class="placeholder">电子邮件地址</span>
					</div>
					<table class="flex-table password-signin">
						<tbody>
							<tr>
								<td class="flex-table-primary">
								<div class="placeholding-input password flex-table-form">
									<input type="password" id="login-password" autocomplete="off" class="text-input flex-table-input" name="password" title="密码">
									<span class="placeholder">密码</span>
								</div></td>
								<td class="flex-table-secondary">
								<input type="submit" id="login-submit" name="login" class="submit btn btn-info flex-table-btn js-submit" value="登录" tabindex="0">
								</td>
							</tr>							
						</tbody>
					</table>
					<div class="forgot-password">
						<label style="display: inline"><input style="display: inline; margin-top: -2px; margin-right: 5px;" type="checkbox" name="remember"/><span>记住我</span></label>
						| <a href="<?php echo site_url('user/forgot_password')?>">忘记密码？</a>
						
					</div>
				</div>
				
				<?php echo form_close();?>
				<?php 
				$attributes = array('id' => 'signform');
				echo form_open('user/register', $attributes);
				?>
				<div class="login-signup">
					<h2><strong>新来 ?</strong> 注册 </h2>
					<div class="placeholding-input">
						<input type="text" class="text-input" id="signup-mail" autocomplete="off" name="mail">
						<span class="placeholder">电子邮件地址</span>
					</div>
					<div class="placeholding-input">
						<input type="password" class="text-input" id="signup-ps" autocomplete="off" name="password">
						<span class="placeholder">密码</span>
					</div>
					<div class="placeholding-input">
						<input type="password" class="text-input" id="signup-ps2" autocomplete="off" name="password2">
						<span class="placeholder">确认密码</span>
					</div>
					<input type="button" id="sign-submit" name="register" class="btn signup-btn btn-warning" value="注册 轻松记">
				</div>
				<?php echo form_close();?>
			</div>
		</div>
	</body>
	<script>bdc.login.handler("<?php echo site_url('user/check') ?>")</script>
</html>